import { createRouter, createWebHashHistory} from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'Launch',
    component: () => import('@/views/Launch.vue')
  },
  {
    path: '/Login',
    name: 'Login',
    component: () => import('@/views/Login.vue')
  },
  {
    path: '/Main',
    name: 'Main',
    redirect: {name: 'homepage'},
    component: () => import('@/views/Main.vue'),
    children:[
      {
        path: '/Main/homepage',
        name: 'homepage',
        component: () => import('@/views/home/index.vue')
      },
      {
        path: '/Main/frameworkindex',
        name: 'frameworkindex',
        component: () => import('@/views/framework/index.vue')
      },
      {
        path: '/Main/business',
        name: 'business',
        component: () => import('@/views/opensource/business.vue')
      },
      {
        path: '/Main/organization',
        name: 'organization',
        component: () => import('@/views/opensource/organization.vue')
      },
      {
        path: '/Main/formplugin',
        name: 'formplugin',
        component: () => import('@/views/plugin/formplugin.vue')
      },
      {
        path: '/Main/second',
        name: 'second',
        component: () => import('@/views/plugin/second.vue')
      },
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
